SequenceEqual(TSource) Method (ParallelQuery(TSource), ParallelQuery(TSource), IEqualityComparer(TSource))

Task Parallel System.Threading

Determines whether two parallel sequences are equal by comparing their elements by using a specified IEqualityComparer{T}.

Namespace:  System.Linq
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function SequenceEqual(Of TSource) ( _
	first As ParallelQuery(Of TSource), _
	second As ParallelQuery(Of TSource), _
	comparer As IEqualityComparer(Of TSource) _
) As Boolean
C#
public static bool SequenceEqual<TSource>(
	ParallelQuery<TSource> first,
	ParallelQuery<TSource> second,
	IEqualityComparer<TSource> comparer
)

Parameters

first
Type: System.Linq..::.ParallelQuery<(Of <(TSource>)>)
A sequence to compare to second.
second
Type: System.Linq..::.ParallelQuery<(Of <(TSource>)>)
A sequence to compare to the first input sequence.
comparer
Type: System.Collections.Generic..::.IEqualityComparer<(Of <(TSource>)>)
An IEqualityComparer<(Of <(T>)>) to use to compare elements.

Type Parameters

TSource
The type of the elements of the input sequences.

Return Value

true if the two source sequences are of equal length and their corresponding elements are equal according to the default equality comparer for their type; otherwise, false.

Exceptions

ExceptionCondition
System..::.ArgumentNullException first or second is a null reference (Nothing in Visual Basic).
System..::.AggregateException One or more exceptions occurred during the evaluation of the query.
System..::.OperationCanceledException The query was canceled.

See Also